home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-04-02 | 1.9 KB | 81 lines | [TEXT/CWIE] |
- // UDebug.h
- // Copyright 1984-1994 Apple Computer, Inc.All rights reserved.
-
- #ifndef __DEBUGGER__
- #define __DEBUGGER__
- #pragma once
-
- #ifndef __STDDEF__
- #include <stddef.h>
- #endif
-
- #ifndef qDebug
- #define qDebug 1
- #endif
-
- #ifndef qTheDebugger
- #define qTheDebugger 1
- #endif
-
- #ifndef qPerform
- #define qPerform 0
- #endif
-
- #ifndef qAppleANSI
- # ifdef __STDDEF__
- # define qAppleANSI 1
- # else
- # define qAppleANSI 0
- # endif
- #endif
-
- //----------------------------------------------------------------------------------------
- // Global function declarations
- //----------------------------------------------------------------------------------------
-
- #if qDebug || qTheDebugger
-
- extern bool gHighLevelDebuggerRunning;
-
- extern bool ConfirmHighLevelDebugger();
-
- inline bool HaveHighLevelDebugger() { return gHighLevelDebuggerRunning != false; }
-
- extern void InitializeDebugger();
-
- extern void FinalizeDebugger();
-
- extern bool DebugCanReadLn();
- // Returns true if you can ReadLn to the user. This in turn is true when there is a
- // debug view (pDebugView), that view can currently write to its window, and this unit
- // is initialized.
-
- extern bool DebugCanWriteLn();
- // Returns true if you can WriteLn to the user in the debug window. This is true if
- // there exists a debug view and this unit is initialized.
-
- extern void ShowSegments();
- // Write a list of the loaded segments out to the debugger.
-
- extern void DebugWriteLnHook(char* textBuf, long byteCount);
- // Wrtie a block of text to the debugger
-
- #else
-
- inline void InitializeDebugger() { }
- inline void FinalizeDebugger() { }
-
- inline bool HaveHighLevelDebugger() { return false; }
-
- inline bool HaveLowLevelDebugger() { return false; }
-
- inline bool DebugCanReadLn() { return false; }
-
- inline bool DebugCanWriteLn() { return false; }
-
- inline void DebugWriteLnHook(char* /*textBuf*/, long /*byteCount*/) {}
-
- #endif
-
- #endif // __DEBUGGER__
-